using System.Text.Json.Nodes;
using JetBrains.Annotations;

namespace SageKing.Designer.BlazorX6.DiagramDesigners.FC;

/// <summary>
/// A diagram designer provider for the Flowchart designer.
/// </summary>
[UsedImplicitly]
public class FlowchartDiagramDesignerProvider : IDiagramDesignerProvider
{
    /// <inheritdoc />
    public double Priority => 0;

    /// <inheritdoc />
    public bool GetSupportsActivity(JsonObject activity) => activity.GetTypeName() == "SageKing.Flowchart";

    /// <inheritdoc />
    public IDiagramDesigner GetEditor() => new FlowchartDiagramDesigner();
}